<template>
    <div id="he-plugin-simple"></div>
</template>

<script>
export default {
    name: "WeatherWidget",
    created() {
        const d = window.document;
        window['WIDGET'] = {
            "CONFIG": {
                "modules": "01234",
                "background": "5",
                "tmpColor": "333333",
                "tmpSize": "16",
                "cityColor": "333333",
                "citySize": "16",
                "aqiColor": "333333",
                "aqiSize": "16",
                "weatherIconSize": "24",
                "alertIconSize": "18",
                "padding": "10px 10px 10px 10px",
                "shadow": "1",
                "language": "auto",
                "fixed": "false",
                "vertical": "top",
                "horizontal": "left",
                "key": "ae2b58712c644525be1d95e2d9f742ee"
            }
        }
        let c = d.createElement('link')
        c.rel = 'stylesheet'
        c.href = 'https://widget.heweather.net/simple/static/css/he-simple.css?v=1.4.0'
        let s = d.createElement('script')
        s.src = 'https://widget.heweather.net/simple/static/js/he-simple.js?v=1.4.0'
        let sn = d.getElementsByTagName('script')[0]
        sn.parentNode.insertBefore(c, sn)
        sn.parentNode.insertBefore(s, sn)
    }
}
</script>

<style scoped>

</style>
